package Test1;

public class Test1 {
    public static  String toString(int[] arr){
        if(arr == null){
            return "null";
        }else if(arr.length == 0){
            return "[]";
        }else{
            StringBuffer res = new StringBuffer();
            res.append("[");
            for(int i = 0;i<arr.length;i++){
                res.append(arr[i]);
                if(i != arr.length-1){
                    res.append(",");
                }
            }
            res.append("]");
            return res.toString();
        }

    }
}
